export function getCurrentUsername() {
  return localStorage.getItem("currentUsername");
}

/*export function setCurrentUsername(username) {
  localStorage.setItem("currentUsername", username);
} */

export function setCurrentUser(user) {
  localStorage.setItem("currentUser", JSON.stringify(user)); // 保存整个用户对象
}

export function clearCurrentUsername() {
  localStorage.removeItem("currentUsername");
}
